# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-http-daemon
pkgver=6.12
pkgrel=0
pkgdesc="HTTP::Daemon perl module"
url="https://metacpan.org/release/HTTP-Daemon"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-http-date perl-http-message"
makedepends="perl-dev perl-module-build-tiny"
checkdepends="perl-test-needs"
replaces="perl-libwww"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Daemon-$pkgver.tar.gz"

builddir="$srcdir"/HTTP-Daemon-$pkgver
build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="83a8b868162dfa1be66d4267e99af1111d28122c793e89d905243c175617c22ceb66f88b6ea54c29e7b131c26668776ab24cf671c4cc6c1c8810505e0f072596  HTTP-Daemon-6.12.tar.gz"
